Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec

Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec
Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec

The Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec schema contains information used to create a new virtual machine to host affinity policy, see POST /vcenter/compute/policies. Virtual machines that have the tag indicated by Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.vm_tag will be affined to hosts that have the tag indicated by Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.host_tag.

This schema was added in vSphere API 9.1.0.0.

AllOf
This class requires all of the following:
JSON Example
{
    "capability": "string",
    "name": "string",
    "description": "string",
    "managed_by": {
        "entity": "string"
    },
    "vm_tag": "string",
    "host_tag": "string",
    "strictness": "string"
}
string
vm_tag
Required

Identifier of a tag that can be associated with a virtual machine. Virtual machines with this tag will be affined to the hosts indicated by Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.host_tag.

This property was added in vSphere API 9.1.0.0.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.cis.tagging.Tag:VirtualMachine. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.cis.tagging.Tag:VirtualMachine.

string
host_tag
Required

Identifier of a tag that can be associated with a host. Virtual machines indicated by Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.vm_tag will be affined to hosts with this tag.

This property was added in vSphere API 9.1.0.0.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.cis.tagging.Tag:HostSystem. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.cis.tagging.Tag:HostSystem.

string
strictness
Optional

Strictness of enforcement for the placement of virtual machines indicated by Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.vm_tag. The strictness behavior is described by Vcenter Compute Policies PolicyStrictness.

If the strictness specified is PREFERRED_DURING_PLACEMENT_PREFERRED_DURING_EXECUTION, and if the virtual machine associated with the policy is being powered-on or is being requested for placement, the policy will be enforced on a best-effort basis. The policy can be violated to generate a successful placement or power-on recommendation by placing the virtual machine on hosts not tagged with Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.host_tag. If the virtual machine is being evacuated or failed over, the policy will be enforced on a best-effort basis. The policy can be violated to have a successful evacuation or failover by placing the virtual machine on hosts not tagged with Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.host_tag.

If the strictness specified is REQUIRED_DURING_PLACEMENT_PREFERRED_DURING_EXECUTION, and if the virtual machine associated with the policy is being powered-on or is being requested for placement, the policy will not be violated. If it cannot be placed on hosts tagged with Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.host_tag, the placement will fail. If the virtual machine is being evacuated or failed over, the policy will be enforced on a best-effort basis. The policy can be violated to have a successful evacuation or failover by placing the virtual machine on hosts not tagged with Vcenter Compute Policies Capabilities VmHostAffinity CreateSpec.host_tag.

For more information see: Vcenter Compute Policies PolicyStrictness.

This property was added in vSphere API 9.1.0.0.

If missing or null, the strictness defaults to PREFERRED_DURING_PLACEMENT_PREFERRED_DURING_EXECUTION.